package com.kaifamiao.www.demo.Do21;

import java.util.Arrays;

public class De02 {
    public static void main(String[] args) {
        int[] arr = {11,21,13,14,23,34,45};
        //copy of (被复制的数组名，新数组的长度)
        int[]copy = Arrays.copyOf(arr,arr.length);
        for(int i = 0;i < copy.length;i++){
            System.out.print(copy[i] +"\t");
        }
        System.out.println();
        int[] copy1 = Arrays.copyOf(arr,arr.length*2);
        for(int i = 0;i < copy1.length;i++){
            System.out.println(copy1[i]);
        }
    }
}
